package com.mxj.web;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author yuisama
 * @date 2023/02/08 19:32
 **/
@Controller
@RequestMapping("/bit")
//设置统一的URL
public class BitController {
    @GetMapping("/hello")
    //这个资源的完整UML是：   /bit/hello
    public String hello(Model model){
        Student student = new Student("小比特","年薪20W","2023就要找工作了");
        model.addAttribute("person",student);
        //将student作为person
        return "just-a-view";
    }

}

